﻿using BCEntity.TMS.Agent.AgentCurrentlyProtocol;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.Agent.AgentCurrentlyProtocol
{
    /// <summary>
    /// 代理商现行协议
    /// </summary>
    public interface IAgentCurrentlyProtocolData
    {
        /// <summary>
        /// 根据代理商记录Id获取代理商现行协议
        /// </summary>
        /// <param name="agentRecordId">代理商记录Id</param>
        /// <returns></returns>
        Task<AgentCurrentlyProtocolEntity> GetEntityByAgentRecordId(long agentRecordId);

        /// <summary>
        /// 添加代理商现行协议
        /// </summary>
        /// <param name="entity">代理商现行协议信息</param>
        /// <returns></returns>
        Task<AgentCurrentlyProtocolEntity> Insert(AgentCurrentlyProtocolEntity entity);

        /// <summary>
        /// 获取代理商现行协议
        /// </summary>
        /// <param name="agentCurrentlyProtocolId">代理商现行协议Id</param>
        /// <returns></returns>
        Task<AgentCurrentlyProtocolEntity> GetEntity(long agentCurrentlyProtocolId);

        /// <summary>
        /// 更新代理商现行协议
        /// </summary>
        /// <param name="entity">代理商现行协议信息</param>
        /// <returns></returns>
        Task<AgentCurrentlyProtocolEntity> Update(AgentCurrentlyProtocolEntity entity);

        /// <summary>
        /// 删除代理商现行协议
        /// </summary>
        /// <param name="agentCurrentlyProtocolId">代理商现行协议Id</param>
        /// <returns></returns>
        Task<int> Delete(long agentCurrentlyProtocolId);

        /// <summary>
        /// 获取代理商现行协议
        /// </summary>
        /// <param name="logonCmpanyId">登录人公司ID</param>
        /// <param name="signStartDate">签署开始日期</param>
        /// <param name="signEndDate">签署结束日期</param>
        /// <param name="pageIndex">页号</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        Task<(IEnumerable<AgentCurrentlyProtocolEntity>, int)> Query(int? logonCmpanyId, DateTime? signStartDate, DateTime? signEndDate, int pageIndex, int pageSize);
    }
}
